﻿#ifndef __QC_MULTIMENU_H_
#define __QC_MULTIMENU_H_

#include <QMouseEvent>
#include <QVector>
#include <QLabel>

#include "QCLabel.h"

class QCMultiMenu : public QWidget
{
    Q_OBJECT
public:
    explicit QCMultiMenu(QWidget *parent = 0);
    ~QCMultiMenu();


protected:
    virtual void paintEvent(QPaintEvent *);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void mousePressEvent(QMouseEvent * event);
    virtual void mouseReleaseEvent(QMouseEvent *event);

public:
    void setQCGeometry(int x, int y, int w = -1, int h = -1);
    void setHorizon(bool b = true);
    void setShowBorder(bool b = true);
    void setMenuSize(int w = 36,int h = 36);
    void addMenu(const QString& iconPath);
    QCLabel* getAt(int n);

	void switchMenuIcon(int n, const QString& path);
	void selectMenu(int n);
	void deSelectMenu(int n);

protected:
    QVector<QCLabel*> m_vMenus;

    bool m_bHorizon;
    bool m_bShowBorder;
    int m_nMenuWidth;
    int m_nMenuHeight;
};

#endif // __QC_MULTIMENU_H_
